<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/pages/include/prelude.jspf"%>
<%@include file="/WEB-INF/pages/include/common.jspf"%>
<link href="<c:url value='/static/css/distance.css' />" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<c:url value='/static/js/aptJson.js' />"></script>
<script type="text/javascript" src="<c:url value='/static/js/validate.js' />"></script>
<script type="text/javascript" src="<c:url value='/static/js/desAptJson.js' />"></script>
<title>添加里程补登</title>
<script type="text/javascript">
$(function() {
   	$("#mainPage #pagetitle").html('添加里程补登');
   
	initCond();
    initABC();
    initAirport();
	initInland();
	initOutland();
	showMsg();
});


function showMsg(){
	if(''!='${errorCode}'){
   		if('999'=='${errorCode}')
   			alert('一些必填字段为空,请输入。');
   		else if('0'=='${errorCode}')
   			alert('添加成功');
   		else if('000_1'=='${errorCode}')
   			alert('Set Status Pending – Verification');
   		else if('000_2'=='${errorCode}')
   			alert('Set Status Pending – Export');
   		else if('001'=='${errorCode}')
   			alert('Invalid Member Number Msg');
   		else if('002'=='${errorCode}')
   			alert('Set Merge ID Invalid Msg');
   		else if('003'=='${errorCode}')
   			alert('Set Not Allow to Accrual Msg');
   		else if('004'=='${errorCode}')
   			alert('Outside Period Msg');
   		else if('005'=='${errorCode}')
   			alert('Set Not in Valid Period Msg');
   		else if('006'=='${errorCode}')
   			alert('Set Not in Retro Period Msg');
   		else if('007'=='${errorCode}')
   			alert('Set Not in Allow Acc Msg');
   		else if('008'=='${errorCode}')
   			alert('In Flight Limited, Not Allow Accrual');
   		else if('009'=='${errorCode}')
   			alert('活动过期！');
   		else if('018'=='${errorCode}')
   			alert('活动过期！');
   		else if('031'=='${errorCode}')
   			alert('不是一个有效的航班！');
   		else if('034'=='${errorCode}')
   			alert('航班日期选择不对！');
   		else if('053'=='${errorCode}')
   			alert('票号没有指定！');
   		else if('054'=='${errorCode}')
   			alert('重复名称');
   		else if('062'=='${errorCode}')
   			alert('Already credited to same customer of ffp');
   	}else{
   		alter('添加失败！');
   	}
}
/**
 * 提交表单
 */
function submitForm(){
		if (!IsNull('airlineCode', '航空代码'))
			return false;
		if (!IsNull('year', '年'))
			return false;
		if (!IsNull('month', '月'))
			return false;
		if (!IsNull('fday', '日'))
			return false;
		$("#mainform").submit();
	}
</script>
</head>
<body>
<div data-role="page" id="mainPage">
	<%@include file="/WEB-INF/pages/include/header.jsp"%>
	<div data-role="content">
		<form action="<c:url value="/member/addDistanceStepInfo.do" />" method="post" data-ajax="false" id="mainform">
		<div class="d_item">
			<ul>
				<li><span class="li_label">知音卡号：</span>
				<!-- input data-role="none" type="text" id="memberNumber" name="memberNumber" value="${allInfo.memberNumber}" class="readtxt t1 " readonly /--><span>${allInfo.memberNumber}</span><span></span></li>
				<li>
				   <!-- span class="li_label">英文名：</span><span class="li_c_label"><input data-role="none" type="text" id="firstName" name="firstName" value="${allInfo.firstName}" class="readtxt t4" readOnly /></span> -->
				   <span class="li_label">英文名：</span><span>${allInfo.firstName}</span>
				   <span><b>英文姓：</b></span><span>${allInfo.lastName}</span> 
				   <!-- span class="li_label">英文姓：</span><span class="li_c_label"><input data-role="none" type="text" id="lastName" name="lastName" value="${allInfo.lastName}" class="readtxt t4" readOnly /></span> -->
				  
				</li>
				<li><span class="li_label">机票号码：</span><span class="li_c_label1"><input id="ticketNumber1" name="ticketNumber1" data-role="none" type="text" value="999" class="txt t4" /></span><span><input data-role="none" id="ticketNumber2" name="ticketNumber2" type="text" class="txt t2" /></span></li>
				<li><span class="li_label">航班号：</span><span >
					<select data-role="none" class="txt t6" style="position:relative;top:-3px;" id="airlineCode" name="airlineCode">
						<option value="CA">中国国际航空公司</option>
						<option value="SC">山东航空股份有限公司</option>
						<option value="TV">西藏航空公司</option>
						<option value="ZH">深圳航空公司</option>
						<option value="CA">大连航空公司</option>
					</select>
				</span><span class="li_c_label2"><input id="flightNum" name="flightNum" data-role="none" type="text" class="txt t7" /></span></li>
				<li>
					<span class="li_label">航班日期：</span>
					<select data-role="none" class="txt t5" name="year" id="year" style="position:relative;top:-3px;">
						<option>年</option>
						<%for(int i=2013;i>2003;i--){ %>
						<option value="<%=i%>"><%=i%></option>
						<%}%>
					</select>
			    	<select data-role="none" class="txt t5" name="month" id="month" style="position:relative;top:-3px;">
			    		<option>月</option>
			    		<%for(int i=1;i<13;i++){ String no="01"; if(i<10){no = "0"+i;}else{no = i+"";} %>
						<option value="<%=no%>"><%=no%></option>
						<%}%>
			    	</select>
			    	<select data-role="none" class="txt t5" name="fday" id="fday" style="position:relative;top:-3px;">
			    		<option>日</option>
			    		<%for(int i=1;i<32;i++){ String no="01"; if(i<10){no = "0"+i;}else{no = i+"";} %>
						<option value="<%=no%>"><%=no%></option>
						<%}%>
			    	</select>
				</li>
			</ul>
			<div>
				<table class="airTable">
				  <thead>
					<tr><td colspan ="5">仅限补录<font color="blue">10</font>天以前，<font color="blue">6</font>个月以内的机票</td></tr>
				  </thead>
				  <tbody>
				  	<tr><td rowspan="2" style="width:17%;"><span class="img_label"><img src="<c:url value='/static/img/imgs/icon480_f.png' />" /></span></td><td><span class="c_mini_label">出发城市</span></td><td rowspan="2"><span class="img_label"><img src="<c:url value='/static/img/imgs/icon480_j.png' />" /></span></td><td><span class="c_mini_label">到达城市</span></td><td rowspan="2"><span class="img_label"><img src="<c:url value='/static/img/imgs/icon480_j.png' />" /></span></td></tr>
				  	<tr><td onclick="opencity('1')"><span class="city_label" id="originLabel">北京首都</span><input id="origin" name="origin" type="hidden" value="PEK" /></td>
				  	
				  	<td onclick="opencity('0')"><span class="city_label" id="destinationLabel">上海虹桥</span><input id="destination" name="destination" type="hidden" value="SHA" /></td></tr>
				  </tbody>
				</table>
			</div>
			<ul>
				<li><span class="li_label">座位号：</span><span><input id="seatNum" name="seatNum" data-role="none" type="text" class="txt t3" /> (座位号请见登机牌)</span></li>
				<li><span class="li_label">舱&nbsp;&nbsp;位：</span><span class="li_label">
					<select data-role="none" class="txt t4" style="position:relative;top:-5px;" id="bookingClass" name="bookingClass">
						<option value="A">A</option>
						<option value="B">B</option>
						<option value="C">C</option>
						<option value="D">D</option>
						<option value="E">E</option>
						<option value="F">F</option>
						<option value="G">G</option>
						<option value="H">H</option>
						<option value="I">I</option>
						<option value="J">J</option>
						<option value="K">K</option>
						<option value="L">L</option>
						<option value="M">M</option>
						<option value="N">N</option>
					</select>
				</span></li>
			</ul>
		</div>
		<br />
		<div><button class="btn" onclick="submitForm();" data-theme="a" type="button">确定</button></div>
		</form>
	</div>
</div>

<div data-role="page" id="city" data-transition="none">
    <%@include file="/WEB-INF/pages/include/header.jsp"%>
    <h1 attr="" data-role="none" style="display:none;"></h1>
    <div data-role="content">
   	  <ul class="menu">
   	  	<li><label><a id="menu_l" onclick="inAirport()">国内机场</a></label></li>
   	  	<li><label><a id="menu_r" onclick="outAirport()">国际机场</a></label></li>
   	  </ul>
    </div>
    <div data-role="content">
    	<div class="abc">
           <a href="javascript:;">常用</a>
           <a href="javascript:;">A</a>
           <a href="javascript:;">B</a>
           <a href="javascript:;">C</a>
           <a href="javascript:;">D</a>
           <a href="javascript:;">E</a>
           <a href="javascript:;">F</a>
           <a href="javascript:;">G</a>
           <a href="javascript:;">H</a>
           <a href="javascript:;">J</a>
           <a href="javascript:;">K</a>
           <a href="javascript:;">L</a>
           <a href="javascript:;">M</a>
           <a href="javascript:;">N</a>
           <a href="javascript:;">P</a>
           <a href="javascript:;">Q</a>
           <a href="javascript:;">R</a>
           <a href="javascript:;">S</a>
           <a href="javascript:;">T</a>
           <a href="javascript:;">W</a>
           <a href="javascript:;">X</a>
           <a href="javascript:;">Y</a>
           <a href="javascript:;">Z</a>
        </div>
        <div>
   		  <ul data-role="listview" data-filter-placeholder="输入城市或简称[北京=bj]..."  data-filter="true" data-inset="true" id="city_list" data-theme="d">
          </ul>
        </div>
	</div>
</div>
</body>
</html>